// path.basename() :获取路径中的文件名，

//引用模块
const path = require('path')

const fpath = '/a/b/c/index.html' //假设为文件存放的路径

var fullName = path.basename(fpath);
console.log(fullName);  //输出index.html

var fullName2 = path.basename(fpath,'.html') 
console.log(fullName2);  //输入 index
